package com.action.h5;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.bean.ResponseBean;
import com.pojo.Config;
import com.service.ConfigService;
import com.service.LunboService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 网站配置查询
 * @author Liao
 */
@RestController
@RequestMapping("/h5")
public class Configh5Action {
    @Autowired
    ConfigService configService;

    /**
     * 查询网站所有的配置属性
     * @return
     */
    @RequestMapping("/config")
    public ResponseBean gettu(){
        List list =  configService.list(new QueryWrapper<Config>().eq("is_show",1));
        if(list.size()>0){
            return new ResponseBean(200,list.size(),"查询成功",list);
        }else{
            return ResponseBean.error("查询失败");
        }
    }

}
